/*
 * cpp_access.c
 *
 *  Created on: 2012/05/30
 *      Author: guanxiaoying
 */

#include "../coredef.h"
#include "../cpp/cppdef.h"
TYPE_DIRECTIVEINFO DLL_EXPORT CDirectiveInfo;
EXTERNAL_SYMBOL(CDirectiveInfo);
//BOOL (*isDefine)( AST astIndex );
static BOOL isDefineDirective( AST index ){
	return CPPDEF_DEF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isUndef)( AST astIndex );
static BOOL isUndefDirective( AST index ){
	return CPPDEF_UNDEF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isInclude)( AST astIndex );
static BOOL isIncludeDirective( AST index ){
	return CPPDEF_INC == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isIf)( AST astIndex );
static BOOL isIfDirective( AST index ){
	return CPPDEF_IF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isElif)( AST astIndex );
static BOOL isElifDirective( AST index ){
	return CPPDEF_ELIF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isElse)( AST astIndex );
static BOOL isElseDirective( AST index ){
	return CPPDEF_ELSE == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isEndif)( AST astIndex );
static BOOL isEndifDirective( AST index ){
	return CPPDEF_ENDIF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isIfdef)( AST astIndex );
static BOOL isIfdefDirective( AST index ){
	return CPPDEF_IFDEF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isIfndef)( AST astIndex );
static BOOL isIfndefDirective( AST index ){
	return CPPDEF_IFNDEF == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isLine)( AST astIndex );
static BOOL isLineDirective( AST index ){
	return CPPDEF_LINE == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isError)( AST astIndex );
static BOOL isErrorDirective( AST index ){
	return CPPDEF_ERROR == stCoreDirectiveInfoAccess.kind.get( index );
}
//BOOL (*isPragma)( AST astIndex );
static BOOL isPragmaDirective( AST index ){
	return CPPDEF_PRAGMA == stCoreDirectiveInfoAccess.kind.get( index );
}
VOID CDirectiveInfoInit( VOID ){
	//AST  (*getMax)( VOID );
	CDirectiveInfo.getMax = stCoreDirectiveInfoAccess.getMax;
	//BOOL (*isDefine)( AST astIndex );
	CDirectiveInfo.isDefine = isDefineDirective;
	//BOOL (*isUndef)( AST astIndex );
	CDirectiveInfo.isUndef = isUndefDirective;
	//BOOL (*isInclude)( AST astIndex );
	CDirectiveInfo.isInclude = isIncludeDirective;
	//BOOL (*isIf)( AST astIndex );
	CDirectiveInfo.isIf =isIfDirective;
	//BOOL (*isElif)( AST astIndex );
	CDirectiveInfo.isElif =isElifDirective;
	//BOOL (*isElse)( AST astIndex );
	CDirectiveInfo.isElse =isElseDirective;
	//BOOL (*isEndif)( AST astIndex );
	CDirectiveInfo.isEndif = isEndifDirective;
	//BOOL (*isIfdef)( AST astIndex );
	CDirectiveInfo.isIfdef = isIfdefDirective;
	//BOOL (*isIfndef)( AST astIndex );
	CDirectiveInfo.isIfndef = isIfndefDirective;
	//BOOL (*isLine)( AST astIndex );
	CDirectiveInfo.isLine = isLineDirective;
	//BOOL (*isError)( AST astIndex );
	CDirectiveInfo.isError = isErrorDirective;
	//BOOL (*isPragma)( AST astIndex );
	CDirectiveInfo.isPragma = isPragmaDirective;
	//AST (*getCodeScp)( AST astIndex );
	CDirectiveInfo.getCodeScp = stCoreDirectiveInfoAccess.locScope.get;
	//AST (*define_getMacroInfo)( AST astIndex );
	CDirectiveInfo.define_getMacroInfo = stCoreDirectiveInfoAccess.idx_result.get;
	CDirectiveInfo.define_getMacroName = stCoreDirectiveInfoAccess.str_param.get;
	//AST (*undef_getMacroInfo)( AST astIndex );
	CDirectiveInfo.undef_getMacroInfo = stCoreDirectiveInfoAccess.idx_result.get;
	CDirectiveInfo.undef_getMacroName = stCoreDirectiveInfoAccess.str_param.get;
	//PSZ (*include_getHeader)( AST astIndex );
	CDirectiveInfo.include_getHeader = stCoreDirectiveInfoAccess.str_param.get;
	//AST (*include_getFileIndex)( AST astIndex );
	CDirectiveInfo.include_getFileIndex = stCoreDirectiveInfoAccess.idx_result.get;
	//AST (*if_getCondtionExp)( AST astIndex );
	CDirectiveInfo.if_getCondtionExp = stCoreDirectiveInfoAccess.idx_param.get;
	//BOOL (*if_isActived)( AST astIndex );
	CDirectiveInfo.if_isActived = stCoreDirectiveInfoAccess.bool_result.get;
	//AST (*elif_getCondtionExp)( AST astIndex );
	CDirectiveInfo.elif_getCondtionExp = stCoreDirectiveInfoAccess.idx_param.get;
	//BOOL (*elif_isActived)( AST astIndex );
	CDirectiveInfo.elif_isActived = stCoreDirectiveInfoAccess.bool_result.get;
	//BOOL (*else_isActived)( AST astIndex );
	CDirectiveInfo.else_isActived = stCoreDirectiveInfoAccess.bool_result.get;
	//PSZ (*ifdef_getLabel)( AST astIndex );
	CDirectiveInfo.ifdef_getLabel = stCoreDirectiveInfoAccess.str_param.get;
	//BOOL (*ifdef_isActived)( AST astIndex );
	CDirectiveInfo.ifdef_isActived = stCoreDirectiveInfoAccess.bool_result.get;
	//PSZ (*ifndef_getLabel)( AST astIndex );
	CDirectiveInfo.ifndef_getLabel = stCoreDirectiveInfoAccess.str_param.get;
	//BOOL (*ifndef_isActived)( AST astIndex );
	CDirectiveInfo.ifndef_isActived = stCoreDirectiveInfoAccess.bool_result.get;
	//S4 (*line_getLineNum)( AST astIndex );
	CDirectiveInfo.line_getLineNum = stCoreDirectiveInfoAccess.s4_param.get;
	//PSZ (*line_getPath)( AST astIndex );
	CDirectiveInfo.line_getPath = stCoreDirectiveInfoAccess.str_param.get;
	//PSZ (*error_getMsg)( AST astIndex );
	CDirectiveInfo.error_getMsg = stCoreDirectiveInfoAccess.str_param.get;
	//PSZ (*pragma_getCommand)( AST astIndex );
	CDirectiveInfo.pragma_getCommand = stCoreDirectiveInfoAccess.str_param.get;
}
TYPE_MACRODEFINFO DLL_EXPORT CMacroInfo;
EXTERNAL_SYMBOL( CMacroInfo );
static BOOL isFunctionMacro( AST astIndex ){
	return MACRO_FUNC == stCoreMacroDefInfoAccess.macroKind.get( astIndex );
}
static BOOL isObjectMacro( AST astIndex ){
	return MACRO_OBJ == stCoreMacroDefInfoAccess.macroKind.get( astIndex );
}
VOID CMacroInfoInit( VOID ){

//	AST  (*getMax)( VOID );
	CMacroInfo.getMax = stCoreMacroDefInfoAccess.getMax;
//	PSZ  (*getMacroName)( AST astIndex );
	CMacroInfo.getMacroName = stCoreMacroDefInfoAccess.macroName.get;
//	BOOL (*isValid)( AST astIndex );
	CMacroInfo.isValid = stCoreMacroDefInfoAccess.bValid.get;
//	BOOL (*isFunctionMacro)( AST astIndex );
	CMacroInfo.isFunctionMacro = isFunctionMacro;
//	BOOL (*isObjectMacro)( AST astIndex );
	CMacroInfo.isObjectMacro = isObjectMacro;
//	S2   (*getParameterNum)( AST astIndex );
	CMacroInfo.getParameterNum = stCoreMacroDefInfoAccess.paramNum.get;
//	BOOL (*hasVariableParameters)( AST astIndex );
	CMacroInfo.hasVariableParameters = stCoreMacroDefInfoAccess.bVariableParam.get;
//	AST (*getFirstToken)( AST astIndex );
	CMacroInfo.getFirstToken = stCoreMacroDefInfoAccess.startReplaceEle.get;
//	AST (*getLastToken)( AST astIndex );
	CMacroInfo.getLastToken = stCoreMacroDefInfoAccess.endReplaceEle.get;
//	AST (*getDirectiveInfo)( AST astIndex );
	CMacroInfo.getDirectiveInfo = stCoreMacroDefInfoAccess.directiveInfo.get;
}
TYPE_REPLACEMENTLIST  DLL_EXPORT CRepListToken
EXTERNAL_SYMBOL( CRepListToken );
static BOOL isParameter( AST index ){
	return EXT_MASK_PAR & stCoreDefRepInfoAccess.kind.get( index );
}
static BOOL isAfterSharpSharp( AST index ){
	U2 kind = stCoreDefRepInfoAccess.kind.get( index );
	U2 pre_kind;
	U2 cnter = stCoreDefRepInfoAccess.index.get( index );
	if( index <= MIN_ARRAY || cnter <= 1 ){
		return FALSE;
	}
	pre_kind = stCoreDefRepInfoAccess.kind.get( index - 1 );
	if( pre_kind == EXT_DSPARAM || pre_kind == EXT_SPARAMDS
		|| pre_kind == EXT_DSSTRING || pre_kind == EXT_SSTRINGDS ){
		if( kind == EXT_DSPARAM || kind == EXT_SPARAMDS
			|| kind == EXT_DSSTRING || kind == EXT_SSTRINGDS ){
			return TRUE;
		}
	}
	return FALSE;
}
static BOOL isBeforeSharpSharp ( AST index ){
	U2 kind;
	U2 post_kind;
	U2 cnter;
	if( index >= stCoreDefRepInfoAccess.getMax() ){
		return FALSE;
	}
	kind = stCoreDefRepInfoAccess.kind.get( index );
	cnter = stCoreDefRepInfoAccess.index.get( index + 1 );
	post_kind = stCoreDefRepInfoAccess.kind.get( index + 1 );
	if( stCoreDefRepInfoAccess.index.get( index ) + 1 != cnter ){
		return FALSE;
	}
	if( post_kind == EXT_DSPARAM || post_kind == EXT_SPARAMDS
		|| post_kind == EXT_DSSTRING || post_kind == EXT_SSTRINGDS ){
		if( kind == EXT_DSPARAM || kind == EXT_SPARAMDS
			|| kind == EXT_DSSTRING || kind == EXT_SSTRINGDS ){
			return TRUE;
		}
	}
	return FALSE;
}
static BOOL isAfterSharp ( AST index ){
	U2 kind = stCoreDefRepInfoAccess.kind.get( index );
	if( kind == EXT_SPARAM || kind == EXT_SSTRING ){
		return TRUE;
	}
	return FALSE;
}
VOID CRepListTokenInit( VOID ){
//	AST  (*getMax)( VOID );
	CRepListToken.getMax = stCoreDefRepInfoAccess.getMax;
//	U2   (*getIndexCnter)(AST astIndex );
	CRepListToken.getIndexCnter = stCoreDefRepInfoAccess.index.get;
//	BOOL (*isParameter)(AST astIndex );
	CRepListToken.isParameter = isParameter;
//	BOOL (*isBeforeSharpSharp)( AST astIndex );
	CRepListToken.isBeforeSharpSharp = isBeforeSharpSharp;
//	BOOL (*isAfterSharpSharp)( AST astIndex );
	CRepListToken.isAfterSharpSharp = isAfterSharpSharp;
//	BOOL (*isAfterSharp)(AST  astIndex );
	CRepListToken.isAfterSharp = isAfterSharp;
//	S2   (*getParamIndex)(AST astIndex );
	CRepListToken.getParamIndex = stCoreDefRepInfoAccess.paramIdx.get;
//	PSZ  (*getTokenLabel)(AST astIndex );
	CRepListToken.getTokenLabel = stCoreDefRepInfoAccess.name.get;
//	U2   (*getTokenKind)(AST astIndex );
	CRepListToken.getTokenKind = stCoreDefRepInfoAccess.ppTokenKind.get;
//	AST  (*getCodeScp)(AST astIndex );
	CRepListToken.getCodeScp = stCoreDefRepInfoAccess.location.get;
}
TYPE_PPCONDITION_EXPR DLL_EXPORT CPPCondExp;
EXTERNAL_SYMBOL( CPPCondExp );
static BOOL isTypeDouble( AST index ){
	return stCorePPConditionAccess.OpKind.get( index )== xPPTOKEN_DOUBLE;
}
static BOOL isTypeUnsigned( AST index ){
	return stCorePPConditionAccess.OpKind.get( index )== xPPTOKEN_ULONG;
}
static BOOL isTypeSigned( AST index ){
	return stCorePPConditionAccess.OpKind.get( index )== xPPTOKEN_LONG;
}
VOID CPPCondExpInit( VOID ){
//	AST  (*getMax)( VOID );
	CPPCondExp.getMax = stCorePPConditionAccess.getMax;
//	BOOL (*isTypeDouble)( AST astIndex );
	CPPCondExp.isTypeDouble = isTypeDouble;
//	BOOL (*isTypeUnsigned)( AST astIndex );
	CPPCondExp.isTypeUnsigned = isTypeUnsigned;
//	BOOL (*isTypeSigned)( AST astIndex );
	CPPCondExp.isTypeSigned = isTypeSigned;
//	DOUBLE (*getValueofDouble)( AST astIndex );
	CPPCondExp.getValueofDouble = stCorePPConditionAccess.dbValue.get;
//	U4 (*getValueofUnsigned)( AST astIndex );
	CPPCondExp.getValueofUnsigned = stCorePPConditionAccess.u4Value.get;
//	U4 (*getValueofsigned)( AST astIndex );
	CPPCondExp.getValueofsigned = stCorePPConditionAccess.s4Value.get;
//	AST (*getLeftNode)( AST astIndex );
	CPPCondExp.getLeftNode = stCorePPConditionAccess.leftNode.get;
//	AST (*getRightNode)( AST astIndex );
	CPPCondExp.getRightNode = stCorePPConditionAccess.rightNode.get;
//	AST (*getCodeScp)( AST astIndex );
	CPPCondExp.getCodeScp = stCorePPConditionAccess.locScp.get;
//	U4 (*getOperatorKind)( AST astIndex );
	CPPCondExp.getOperatorKind = stCorePPConditionAccess.nodeKind.get;
}
TYPE_PPTOKENLIST DLL_EXPORT CPPTokenList
EXTERNAL_SYMBOL( CPPTokenList );
VOID CPPTokenListInit( VOID ){
//	AST  (*getMax)( VOID );
	CPPTokenList.getMax = stCorePPTokenListAccess.getMax;
//	AST (*getCodeScp)( AST astIndex );
	CPPTokenList.getCodeScp = stCorePPTokenListAccess.codeScope.get;
//	PSZ (*getTokenLabel)( AST astIndex );
	CPPTokenList.getTokenLabel = stCorePPTokenListAccess.name.get;
}
TYPE_PPCONDEXPKIND DLL_EXPORT CPPCondExpKind
EXTERNAL_SYMBOL( CPPCondExpKind );
static BOOL returnFalse( U4 operatorKind ){
	return FALSE;
}
static BOOL isIdentifier( U4 operatorKind ){
	return operatorKind == xPPTOKEN_SYM;
}
static BOOL isConstantNumber( U4 operatorKind ){
	return operatorKind == xPPTOKEN_LONG
			|| operatorKind == xPPTOKEN_ULONG
			|| operatorKind == xPPTOKEN_DOUBLE;
}
static BOOL isParentheseExp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_OPENPAREN;
}

static BOOL isUnaryOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_MINUS
			||operatorKind == xPPTOKEN_PLUS
			||operatorKind == xPPTOKEN_NEG
			||operatorKind == xPPTOKEN_NOT ;
}
static BOOL isMultiplicativeOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_MUL
			||operatorKind == xPPTOKEN_DIV
			||operatorKind == xPPTOKEN_MOD;
}
static BOOL isAdditiveOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_ADD
			||operatorKind == xPPTOKEN_SUB;
}
static BOOL isShiftOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_LSHT
			||operatorKind == xPPTOKEN_RSHT;
}
static BOOL isRelationalOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_LESSEQU
			||operatorKind == xPPTOKEN_LESS
			||operatorKind == xPPTOKEN_MORE
			||operatorKind == xPPTOKEN_MOREEQU;
}
static BOOL isEqualityOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_EQUEQU
			||operatorKind == xPPTOKEN_NOTEQU;
}
static BOOL isBitwiseAndOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_AND;
}
static BOOL isBitwiseExclusiveOrOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_OR;
}
static BOOL isBitwiseInclusiveOrOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_XOR;
}
static BOOL isLogicalAndOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_ANDAND;
}
static BOOL isLogicalOrOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_OROR;
}
static BOOL isConditionalOp( U4 operatorKind ){
	return operatorKind == xPPTOKEN_QUESTION
			|| operatorKind == xPPTOKEN_COLON;
}
static PSZ  getPPCondOpStr( U4 kind ){
	switch( kind ){
	case xPPTOKEN_SYM: return "Operand";
	case xPPTOKEN_LONG: return "Operand";
	case xPPTOKEN_ULONG	: return "Operand";
	case xPPTOKEN_DOUBLE: return "Operand";
	case xPPTOKEN_EQUEQU: return "==";
	case xPPTOKEN_NOTEQU:return "!=";
	case xPPTOKEN_NOT	:	return "!";
	case xPPTOKEN_POINTERMEM:	return "->";
	case xPPTOKEN_SUB	:	return "-";
	case xPPTOKEN_ADD	:	return "+";
	case xPPTOKEN_LSHT	:	return "<<";
	case xPPTOKEN_LESSEQU:		return "<=";
	case xPPTOKEN_LESS	:		return "<";
	case xPPTOKEN_RSHT	:		return ">>";
	case xPPTOKEN_MOREEQU:		return ">=";
	case xPPTOKEN_MORE		:	return ">";
	case xPPTOKEN_OROR		:	return "||";
	case xPPTOKEN_OR		:	return "|";
	case xPPTOKEN_ANDAND	:	return "&&";
	case xPPTOKEN_AND		:	return "&";
	case xPPTOKEN_MUL		:	return "*";
	case xPPTOKEN_DIV		:	return "/";
	case xPPTOKEN_MOD		:	return "%";
	case xPPTOKEN_XOR		:	return "^";
	case xPPTOKEN_OPENARRAY	:	return "[]";
	case xPPTOKEN_OPENPAREN	:	return "()";
	case xPPTOKEN_NEG		:	return "~";
	case xPPTOKEN_QUESTION	:	return "?";
	case xPPTOKEN_COLON		:	return ":";
	case xPPTOKEN_PLUS		:	return "+";
	case xPPTOKEN_MINUS		:	return "-";
	}
	return "error";
}
VOID CPPCondExpKindInit( VOID ){
//	BOOL   (*isIdentifier)( U4 operatorKind );
	CPPCondExpKind.isIdentifier = isIdentifier;
//	BOOL   (*isConstantNumber)( U4 operatorKind );
	CPPCondExpKind.isConstantNumber = isConstantNumber ;
//	BOOL   (*isParentheseExp)( U4 operatorKind );
	CPPCondExpKind.isParentheseExp = isParentheseExp ;
//	BOOL   (*isPostfixOp)( U4 operatorKind );
	CPPCondExpKind.isPostfixOp = returnFalse ;
//	BOOL   (*isUnaryOp)( U4 operatorKind );
	CPPCondExpKind.isUnaryOp = isUnaryOp ;
//	BOOL   (*isCastOp)( U4 operatorKind );
	CPPCondExpKind.isCastOp = returnFalse ;
//	BOOL   (*isMultiplicativeOp)( U4 operatorKind );
	CPPCondExpKind.isMultiplicativeOp = isMultiplicativeOp ;
//	BOOL   (*isAdditiveOp)( U4 operatorKind );
	CPPCondExpKind.isAdditiveOp = isAdditiveOp ;
//	BOOL   (*isShiftOp)( U4 operatorKind );
	CPPCondExpKind.isShiftOp = isShiftOp ;
//	BOOL   (* isRelationalOp)( U4 operatorKind );
	CPPCondExpKind.isRelationalOp = isRelationalOp ;
//	BOOL   (*isEqualityOp)( U4 operatorKind );
	CPPCondExpKind.isEqualityOp = isEqualityOp ;
//	BOOL   (*isBitwiseAndOp)( U4 operatorKind );
	CPPCondExpKind.isBitwiseAndOp = isBitwiseAndOp ;
//	BOOL   (*isBitwiseExclusiveOrOp)( U4 operatorKind );
	CPPCondExpKind.isBitwiseExclusiveOrOp = isBitwiseExclusiveOrOp ;
//	BOOL   (*isBitwiseInclusiveOrOp)( U4 operatorKind );
	CPPCondExpKind.isBitwiseInclusiveOrOp = isBitwiseInclusiveOrOp ;
//	BOOL   (*isLogicalAndOp)( U4 operatorKind );
	CPPCondExpKind.isLogicalAndOp = isLogicalAndOp ;
//	BOOL  (*isLogicalOrOp)( U4 operatorKind );
	CPPCondExpKind.isLogicalOrOp = isLogicalOrOp ;
//	BOOL   (*isConditionalOp)( U4 operatorKind );
	CPPCondExpKind.isConditionalOp = isConditionalOp ;
//	BOOL   (*isAssignmentOp)( U4 operatorKind );
	CPPCondExpKind.isAssignmentOp = returnFalse ;
//	BOOL   (*isCommaOp)( U4 operatorKind );
	CPPCondExpKind.isCommaOp = returnFalse ;
//	PSZ  (*CppGetOpLabel)( U4 operatorKind );
	CPPCondExpKind.CppGetOpLabel = getPPCondOpStr;
}
TYPE_PPPOSTFIXOP DLL_EXPORT CPPPostfixOpKind
EXTERNAL_SYMBOL( CPPPostfixOpKind );
VOID CPPPostfixOpKindInit( VOID ){
//	BOOL   (*isArrayCall)( U4 operatorKind );
	CPPPostfixOpKind.isArrayCall = returnFalse;
//	BOOL   (*isFunctionCall)( U4 operatorKind );
	CPPPostfixOpKind.isFunctionCall = returnFalse;
//	BOOL   (*isDot)( U4 operatorKind );
	CPPPostfixOpKind.isDot = returnFalse;
//	BOOL   (*isArrow)( U4 operatorKind );
	CPPPostfixOpKind.isArrow = returnFalse;
//	BOOL   (*isPostIncrement)( U4 operatorKind );
	CPPPostfixOpKind.isPostIncrement = returnFalse;
//	BOOL   (*isPostDecrement)( U4 operatorKind );
	CPPPostfixOpKind.isPostDecrement = returnFalse;
//	BOOL   (*isCompoundLiterals)( U4 operatorKind );
	CPPPostfixOpKind.isCompoundLiterals = returnFalse;
}
TYPE_PPUNARYOP DLL_EXPORT CPPUnaryOpKind
EXTERNAL_SYMBOL( CPPUnaryOpKind );
static BOOL isUnaryPlus( U4 kind ){
	return kind == xPPTOKEN_PLUS;
}
static BOOL isUnaryMinus( U4 kind ){
	return kind == xPPTOKEN_MINUS;
}
static BOOL isBitwiseNegation( U4 kind ){
	return kind == xPPTOKEN_NEG;
}
static BOOL isValueNegation( U4 kind ){
	return kind == xPPTOKEN_NOT;
}
VOID CPPUnaryOpKindInit(VOID){
//	BOOL   (*isPreIncrement)( U4 operatorKind );
	CPPUnaryOpKind.isPreIncrement = returnFalse;
//	BOOL   (* isPreDecrement)( U4 operatorKind );
	CPPUnaryOpKind.isPreDecrement = returnFalse;
//	BOOL   (*isGetAddressOp)( U4 operatorKind );
	CPPUnaryOpKind.isGetAddressOp = returnFalse;
//	BOOL  (* isIndirectionOp)( U4 operatorKind );
	CPPUnaryOpKind.isIndirectionOp = returnFalse;
//	BOOL   (*isUnaryPlus)( U4 operatorKind );
	CPPUnaryOpKind.isUnaryPlus = isUnaryPlus;
//	BOOL  (* isUnaryMinus)( U4 operatorKind );
	CPPUnaryOpKind.isUnaryMinus = isUnaryMinus;
//	BOOL  (* isBitwiseNegation)( U4 operatorKind );
	CPPUnaryOpKind.isBitwiseNegation = isBitwiseNegation;
//	BOOL  (* isValueNegation)( U4 operatorKind );
	CPPUnaryOpKind.isValueNegation = isValueNegation;
//	BOOL  (* isSizeof)( U4 operatorKind );
	CPPUnaryOpKind.isSizeof = returnFalse;
}
TYPE_PPMULTIPLICATIVEOP DLL_EXPORT CPPMultiOpKind
EXTERNAL_SYMBOL( CPPMultiOpKind );
static BOOL isMultiplicative( U4 kind ){
	return kind == xPPTOKEN_MUL;
}
static BOOL isDivision( U4 kind ){
	return kind == xPPTOKEN_DIV;
}
static BOOL isRemainderOp( U4 kind ){
	return kind == xPPTOKEN_MOD;
}
VOID CPPMultiOpKindInit(VOID){
//	BOOL   (*isMultiplicative)( U4 operatorKind );
	CPPMultiOpKind.isMultiplicative = isMultiplicative;
//	BOOL   (*isDivision)( U4 operatorKind );
	CPPMultiOpKind.isDivision = isDivision;
//	BOOL   (*isRemainderOp)( U4 operatorKind );
	CPPMultiOpKind.isRemainderOp = isRemainderOp;
}
TYPE_PPADDITIVEOP DLL_EXPORT CPPAdditiveOpKind
EXTERNAL_SYMBOL( CPPAdditiveOpKind );
static BOOL isAdditive( U4 kind ){
	return kind == xPPTOKEN_ADD;
}
static BOOL isSubtraction( U4 kind ){
	return kind == xPPTOKEN_SUB;
}
VOID CPPAdditiveOpKindInit( VOID ){
//	BOOL   (*isAdditive)( U4 operatorKind );
	CPPAdditiveOpKind.isAdditive = isAdditive;
//	BOOL   (*isSubtraction)( U4 operatorKind );
	CPPAdditiveOpKind.isSubtraction = isSubtraction;
}
TYPE_PPSHIFTOP DLL_EXPORT CPPShiftOpKind
EXTERNAL_SYMBOL( CPPShiftOpKind );
static BOOL isLeftShift( U4 kind ){
	return kind == xPPTOKEN_LSHT;
}
static BOOL isRightShift( U4 kind ){
	return kind == xPPTOKEN_RSHT;
}

VOID CPPShiftOpKindInit( VOID ){
//	BOOL   (*isLeftShift)( U4 operatorKind );
	CPPShiftOpKind.isLeftShift = isLeftShift;
//	BOOL   (*isRightShift)( U4 operatorKind );
	CPPShiftOpKind.isRightShift = isRightShift;
}
TYPE_PPRELATIONALOP DLL_EXPORT CPPRelationalOpKind
EXTERNAL_SYMBOL( CPPRelationalOpKind );
static BOOL isGreaterOrEqual( U4 kind ){
	return kind == xPPTOKEN_MOREEQU;
}
static BOOL isGreater( U4 kind ){
	return kind == xPPTOKEN_MORE;
}
static BOOL isLessOrEqual( U4 kind ){
	return kind == xPPTOKEN_LESSEQU;
}
static BOOL isLess( U4 kind ){
	return kind == xPPTOKEN_LESS;
}
VOID CPPRelationalOpKindInit( VOID ){
//	BOOL   (*isGreaterOrEqual)( U4 operatorKind );
	CPPRelationalOpKind.isGreaterOrEqual = isGreaterOrEqual;
//	BOOL   (*isGreater)( U4 operatorKind );
	CPPRelationalOpKind.isGreater = isGreater;
//	BOOL   (*isLessOrEqual)( U4 operatorKind );
	CPPRelationalOpKind.isLessOrEqual = isLessOrEqual;
//	BOOL   (*isLess)( U4 operatorKind );
	CPPRelationalOpKind.isLess = isLess;
}
TYPE_PPEQUALITYOP DLL_EXPORT CPPEqualityOpKind
EXTERNAL_SYMBOL( CPPEqualityOpKind );
static BOOL isEqualOp( U4 kind ){
	return kind == xPPTOKEN_LESSEQU;
}
static BOOL isUnequalOp( U4 kind ){
	return kind == xPPTOKEN_LESS;
}
VOID CPPEqualityOpKindInit( VOID ){
//	BOOL   (*isEqualOp)( U4 operatorKind );
	CPPEqualityOpKind.isEqualOp =isEqualOp;
//	BOOL   (*isUnequalOp)( U4 operatorKind );
	CPPEqualityOpKind.isUnequalOp =isUnequalOp;
}

TYPE_PPCONDITIONOP DLL_EXPORT CPPConditionOpKind
EXTERNAL_SYMBOL( CPPConditionOpKind );
static BOOL isQuestionOp( U4 kind ){
	return kind == xPPTOKEN_QUESTION;
}
static BOOL isColonOp( U4 kind ){
	return kind == xPPTOKEN_COLON;
}
VOID CPPConditionOpKindOpKindInit( VOID ){
	CPPConditionOpKind.isQuestionOp =isQuestionOp;
	CPPConditionOpKind.isColonOp =isColonOp;
}

TYPE_PPASSIGNMENTOP DLL_EXPORT CPPAssignOpKind
EXTERNAL_SYMBOL( CPPAssignOpKind );
//
VOID CPPAssignOpKindInit( VOID ){
//	BOOL   (*isAssignment)( U4 operatorKind );
	CPPAssignOpKind.isAssignment = returnFalse;
//	BOOL   (*isMultiAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isMultiAssignOp = returnFalse;
//	BOOL   (*isDivisionAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isDivisionAssignOp = returnFalse;
//	BOOL   (*isRemainderAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isRemainderAssignOp = returnFalse;
//	BOOL   (*isAddAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isAddAssignOp = returnFalse;
//	BOOL   (*isSubtractionAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isSubtractionAssignOp = returnFalse;
//	BOOL   (*isLeftShiftAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isLeftShiftAssignOp = returnFalse;
//	BOOL   (*isRightShiftAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isRightShiftAssignOp = returnFalse;
//	BOOL   (*isBitAndAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isBitAndAssignOp = returnFalse;
//	BOOL   (*isBitExOrAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isBitExOrAssignOp = returnFalse;
//	BOOL   (*isBitOrAssignOp)( U4 operatorKind );
	CPPAssignOpKind.isBitOrAssignOp = returnFalse;
}

const CPP_OUTPUT_FUNCTIONS  DLL_EXPORT CPPOutput = {
		&CDirectiveInfo,
		&CMacroInfo,
		&CRepListToken,
		&CPPCondExp,
		&CPPTokenList,
		&CPPCondExpKind,
		&CPPPostfixOpKind,
		&CPPUnaryOpKind,
		&CPPMultiOpKind,
		&CPPAdditiveOpKind,
		&CPPShiftOpKind,
		&CPPRelationalOpKind,
		&CPPEqualityOpKind,
		&CPPConditionOpKind,
		&CPPAssignOpKind
};
EXTERNAL_SYMBOL( CPPOutput );

